package com.xinchuang.domain.vo;

import com.xinchuang.entity.PartMoldType;
import lombok.Data;
import org.springframework.beans.BeanUtils;

@Data
public class PartPriceVo {

    private String height;

    private String width;

    private String length;

    private String density;

    private Boolean isMoldFrame;

    private String partId;

    private String partName;

    private Boolean isStandardCom;

    private Boolean isMainMaterial;

    private Boolean isRequired;

    private String price;

    public static PartPriceVo partMoldType2PartPriceVo(PartMoldType partMoldType) {
        PartPriceVo vo = new PartPriceVo();
        BeanUtils.copyProperties(partMoldType, vo);
        vo.setLength(partMoldType.getConstOfLength());
        vo.setWidth(partMoldType.getConstOfWidth());
        vo.setHeight(partMoldType.getConstOfHeight());
        return vo;
    }
}
